package com.medical.view.admin.user;

import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
import org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.StringResourceModel;

import com.medical.view.wicket.Model.MedStringResourceModel;
import com.medical.view.wicket.html.panal.MedPanel;
import com.medical.view.wicket.table.MedAjaxFallbackDefaultDataTable;
import com.medical.view.wicket.table.MedPropertyColumn;



public class UserListTable extends MedPanel {

	public UserListTable(String id) {
		super(id);
//		IColumn<String> c=new IColumn()n<String>;
		 final UserProvider userProvider = new UserProvider();
	        
	        IColumn[] columns = new IColumn[5];
	        columns[0] = new MedPropertyColumn(new Model("id"), "id", "id");
	        columns[1] = new MedPropertyColumn(new Model("Name"), "name", "name");
	        columns[2] = new MedPropertyColumn(new Model("sdss"), "account", "account.accountName");
	        columns[3] = new MedPropertyColumn(new Model("role"), "account.role.roleName", "account.role.roleName");
	        columns[4] = new MedPropertyColumn(new Model("password"), "account.password", "account.password");
	        
//		        
	        MedAjaxFallbackDefaultDataTable  d=new MedAjaxFallbackDefaultDataTable("userList", columns, userProvider,4);
//	        d.
	        d.setOutputMarkupId(true);
		add(d);
	}

}
